Skip to content

Add variable picker dropdown to SliderRow for design token scales - #548

Merged
jackgranatowski merged 2 commits into
mainfrom
claude/framework-configurator-variables-0eos54
Jul 6, 2026
Merged

Add variable picker dropdown to SliderRow for design token scales#548
jackgranatowski merged 2 commits into
mainfrom
claude/framework-configurator-variables-0eos54

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactors SliderRow to display a dropdown picker when a slider's default value is a CSS variable (e.g., var(--sf-radius-m)), allowing users to select from sibling scale steps instead of only adjusting a bare numeric slider. When a custom value is entered, the UI falls back to a raw CSS text input or numeric slider as appropriate.

Key Changes

  • SliderRow.svelte: Completely refactored the raw CSS mode logic

    • Replaced userRawMode boolean with a three-state manualView ('none' | 'slider' | 'raw') to track user intent separately from derived state
    • Added variableOptions prop to accept sibling scale steps (e.g., all space scale tokens)
    • Introduced showPicker derived state: displays a <select> dropdown when the current value matches a known option
    • Introduced showRawText derived state: displays raw CSS text input when outside the picker and user has forced raw mode or the value is a CSS expression
    • Added prettyVar() helper to extract readable token names from var(--sf-*) expressions
    • Added pickOption() and backToVariable() handlers to manage transitions between picker, slider, and raw modes
    • Improved styling: raw text input now has indigo border when active; added "← back to variable" button to return from slider to picker
    • Fixed state management: isEditingisEditingRaw for clarity; syncing now respects edit state
  • variableScales.ts (new file): Centralized scale definitions

    • Exported VarOption interface and scale constants: SPACE_SCALE, RADIUS_SCALE, BORDER_WIDTH_SCALE, CONTAINER_SCALE, SIZE_SCALE, SHADOW_SCALE
    • Each scale is a list of { label, value } pairs ready to pass to SliderRow
  • ComponentsPanel.svelte, BordersPanel.svelte, LayoutPanel.svelte, MacrosPanel.svelte, MiscPanel.svelte, SpacingPanel.svelte: Updated all SliderRow instances

    • Added variableOptions prop to every slider that has a rawDefault pointing to a design token scale
    • Imported and passed the appropriate scale constant (e.g., SPACE_SCALE for spacing tokens, RADIUS_SCALE for radius tokens)
    • Ensured type safety by annotating token arrays with explicit VarOption[] types

Notable Implementation Details

  • The picker only appears when currentRaw is undefined or matches one of the known options; custom expressions fall through to raw text mode
  • Resetting from a custom value returns to the default via onReset() and resets manualView to 'none'
  • The "Custom value…" option in the dropdown (value __sf_custom__) triggers slider mode, allowing numeric entry
  • State transitions are explicit: picking an option sets manualView = 'none' (auto-detect), forcing raw mode sets manualView = 'raw', etc.
  • Removed raw CSS mode from --sf-scroll-shadow-size (MacrosPanel) as it has no variable default
  • Added variable support to --sf-touch-target (MiscPanel) with SIZE_SCALE

https://claude.ai/code/session_01FjJFq6kh8ujT4sdUxfeLxQ

Summary by CodeRabbit

  • New Features

    • Added variable-based options to sliders, letting users switch between direct values, CSS variables, and raw text entry in more places.
    • Expanded several panel controls so spacing, sizing, radius, border, container, and shadow settings can be chosen from consistent preset scales.
  • Bug Fixes

    • Improved raw value editing so typed values stay in sync while editing and return to slider mode more smoothly.

… resolved sliders

Several dimension knobs (--sf-gap, --sf-gutter, --sf-btn-radius,
--sf-touch-target, radius/space/border-width steps, ...) default to another
design token via var(...), but SliderRow only surfaced that as a small
"default: var(...)" caption while the slider itself showed a bare resolved
number — hiding the fact that the value comes from the space/radius/border-
width/size scale.

SliderRow now renders a dropdown of the token's default plus its sibling
scale steps whenever variable info is available, falling back to the
numeric slider only behind an explicit "Custom value…" choice (or when the
current override doesn't match any known option). Unrecognized CSS
expressions still surface as editable raw text instead of a resolved
number.

Also wires up --sf-touch-target in MiscPanel, which was missing its
rawDefault entirely despite aliasing --sf-size-l.

configurator/scripts/check-curation.mjs already confirms every public knob
has a home domain, so this is a display fix rather than a coverage gap.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jackgranatowski, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cd625a28-5c49-4a4e-b449-b437296da96d

📥 Commits

Reviewing files that changed from the base of the PR and between 2676c76 and 02b2f95.

📒 Files selected for processing (2)
  • configurator/src/components/inputs/SliderRow.svelte
  • configurator/tests-components/token-editing.test.js
📝 Walkthrough

Walkthrough

Adds a new variableScales.ts module exporting predefined CSS variable option lists, extends SliderRow.svelte with a variableOptions prop and a variable/raw-CSS view-selection state machine, and wires variableOptions through SliderRow instances across BordersPanel, ComponentsPanel, LayoutPanel, MacrosPanel, MiscPanel, and SpacingPanel.

Changes

Variable scale slider options

Layer / File(s) Summary
Variable scale definitions
configurator/src/lib/variableScales.ts
Adds VarOption interface, a scale() helper, and exported CSS variable option lists (SPACE_SCALE, RADIUS_SCALE, BORDER_WIDTH_SCALE, CONTAINER_SCALE, SIZE_SCALE, SHADOW_SCALE).
SliderRow variable/raw state machine
configurator/src/components/inputs/SliderRow.svelte
Adds a variableOptions prop, derived dropdown/state flags (allOptions, matchedOption, manualView, showPicker, showRawText), rawDraft/isEditingRaw syncing, and updates the template to render a select dropdown, raw CSS input, or slider with a back-to-variable button.
BordersPanel wiring
configurator/src/components/panels/BordersPanel.svelte
Imports scale constants/VarOption, extends COMPONENT_TOKENS with variableOptions, and passes variableOptions to divider, radius, and field-shape sliders.
ComponentsPanel wiring
configurator/src/components/panels/ComponentsPanel.svelte
Converts BUTTON_TOKENS/CARD_TOKENS to typed arrays with variableOptions and wires them into button/card sliders.
LayoutPanel wiring
configurator/src/components/panels/LayoutPanel.svelte
Adds variableOptions to center wrapper, imposter, content grid, and zigzag sliders using SPACE_SCALE/CONTAINER_SCALE.
MacrosPanel wiring
configurator/src/components/panels/MacrosPanel.svelte
Replaces prior raw-token props with variableOptions on flow space, scroll shadow, prose, and media radius sliders.
MiscPanel and SpacingPanel wiring
configurator/src/components/panels/MiscPanel.svelte, configurator/src/components/panels/SpacingPanel.svelte
Adds raw CSS-variable handling with SIZE_SCALE to touch-target slider and variableOptions with SPACE_SCALE to spacing sliders.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SliderRow
  participant RangeWithNumber

  User->>SliderRow: interacts with control
  SliderRow->>SliderRow: compute allOptions, matchedOption
  alt showPicker true
    SliderRow-->>User: render select dropdown
    User->>SliderRow: pickOption(value)
  else showRawText true
    SliderRow-->>User: render raw CSS input
    User->>SliderRow: onRawSet(rawDraft)
  else
    SliderRow->>RangeWithNumber: render slider
    User->>SliderRow: backToVariable()
  end
Loading

Possibly related PRs

  • codeslash-dev/SLASHED#460: Earlier PR wired raw token editing (rawDefault/currentRaw/onRawSet) into SliderRow usage in MacrosPanel, directly overlapping with this PR's refactor of SliderRow's raw-mode handling and variableOptions extension.

Suggested labels: codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a variable picker dropdown to SliderRow for design token scales.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/framework-configurator-variables-0eos54

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Show variable-backed SliderRow defaults as scale pickers

✨ Enhancement 🐞 Bug fix 🕐 40+ Minutes

Grey Divider

AI Description

• Add a dropdown picker for sliders whose defaults are CSS variables (design tokens).
• Preserve raw CSS editing for expressions while keeping numeric sliders for custom values.
• Centralize scale option lists and wire them into all variable-backed knobs.
Diagram

graph TD
  VS["variableScales.ts"] --> P["Panels"] --> SR["SliderRow.svelte"] --> D{"Mode"}
  D --> PK["Variable picker"] --> O["Overrides state"]
  D --> RT["Raw CSS input"] --> O
  D --> SL["RangeWithNumber"] --> O

  subgraph Legend
    direction LR
    _f["File/Module"] ~~~ _ui{"UI decision"} ~~~ _s["UI control"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Infer scale options from rawDefault token name
  • ➕ Avoids threading variableOptions through every SliderRow call site
  • ➕ Less repetition in panel definitions
  • ➖ Brittle parsing/mapping (needs a registry anyway for non-standard tokens)
  • ➖ Harder to type-check and reason about which options are valid per knob
2. Introduce a dedicated TokenPicker component wrapping SliderRow
  • ➕ Isolates the mode/state machine in a focused component
  • ➕ Could standardize styling/behavior across future token-backed inputs
  • ➖ More component surface area and prop plumbing
  • ➖ May duplicate parts of SliderRow unless SliderRow is split significantly
3. Central knob metadata registry (token -> scale) used by panels
  • ➕ Single source of truth for which token belongs to which scale
  • ➕ Could power validation, docs, and UI affordances beyond pickers
  • ➖ Heavier upfront design and migration effort
  • ➖ Overkill if only a small set of sliders need scale pickers

Recommendation: The current approach (explicit variableOptions + centralized variableScales) is a good balance: it keeps SliderRow generic, avoids brittle inference, and makes panel intent explicit and typeable. If picker usage expands significantly, consider evolving toward a knob metadata registry to reduce per-panel repetition.

Files changed (8) +178 / -46

Enhancement (7) +173 / -46
SliderRow.svelteAdd variable-backed dropdown picker with explicit mode state +93/-26

Add variable-backed dropdown picker with explicit mode state

• Refactors raw-CSS handling into a three-state manualView and introduces a variable picker when the current value matches a known token option. Adds expression-shaped detection to prefer editable raw text over resolved numeric sliders, and provides transitions for 'Custom value…' and 'back to variable'.

configurator/src/components/inputs/SliderRow.svelte

BordersPanel.svelteWire border/radius/space scale options into SliderRow knobs +9/-4

Wire border/radius/space scale options into SliderRow knobs

• Imports scale lists and passes variableOptions for variable-backed defaults (e.g., divider width/gap, media radius, and component tokens). Adds explicit typing for token arrays to ensure options are provided consistently.

configurator/src/components/panels/BordersPanel.svelte

ComponentsPanel.svelteProvide scale pickers for button/card variable-default sliders +16/-13

Provide scale pickers for button/card variable-default sliders

• Annotates token configs with VarOption[] and supplies variableOptions for radius/space/border-width/size-backed defaults. Ensures SliderRow can render a dropdown instead of a resolved numeric value for these knobs.

configurator/src/components/panels/ComponentsPanel.svelte

LayoutPanel.svelteEnable scale dropdowns for container and spacing-backed layout knobs +7/-0

Enable scale dropdowns for container and spacing-backed layout knobs

• Imports SPACE_SCALE and CONTAINER_SCALE and passes variableOptions to relevant SliderRow instances (center widths, gutters, imposter margin, breakout widths, etc.).

configurator/src/components/panels/LayoutPanel.svelte

MacrosPanel.svelteAdd variableOptions for macro spacing/radius knobs; remove raw mode where not needed +4/-3

Add variableOptions for macro spacing/radius knobs; remove raw mode where not needed

• Supplies SPACE_SCALE/RADIUS_SCALE to variable-backed SliderRow controls so they render pickers. Removes rawDefault/currentRaw/onRawSet for --sf-scroll-shadow-size, keeping it as a plain numeric knob.

configurator/src/components/panels/MacrosPanel.svelte

SpacingPanel.svelteEnable space scale dropdowns for gap/content-gap/gutter knobs +4/-0

Enable space scale dropdowns for gap/content-gap/gutter knobs

• Imports SPACE_SCALE and passes variableOptions for spacing knobs whose defaults are token variables, allowing selection among sibling space steps.

configurator/src/components/panels/SpacingPanel.svelte

variableScales.tsAdd centralized design-token scale option lists for variable pickers +40/-0

Add centralized design-token scale option lists for variable pickers

• Introduces VarOption and exports scale arrays for space, radius, border-width, container, size, and shadow. Provides a shared source of dropdown-ready {label,value} pairs for SliderRow.

configurator/src/lib/variableScales.ts

Bug fix (1) +5 / -0
MiscPanel.svelteAdd variable-backed support for --sf-touch-target using size scale +5/-0

Add variable-backed support for --sf-touch-target using size scale

• Adds rawDefault/currentRaw/onRawSet and SIZE_SCALE variableOptions so touch target can be selected from sibling size tokens or overridden with a custom value.

configurator/src/components/panels/MiscPanel.svelte

@coderabbitai coderabbitai Bot added the codex label Jul 6, 2026
@qodo-code-review

qodo-code-review Bot commented Jul 6, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 12 rules

Grey Divider


Remediation recommended

1. Picker activates too broadly ✓ Resolved 🐞 Bug ≡ Correctness
Description
SliderRow shows the variable <select> whenever hasVarInfo is true and currentRaw is
undefined, even if there are no sibling variableOptions (or the default is a non-var(...)
expression). This changes some rows (e.g. BordersPanel fine-tune radii, LayoutPanel sticky offsets)
from a direct slider to a dropdown-first flow, requiring an extra “Custom value…” step and surfacing
awkward single-option selects.
Code

configurator/src/components/inputs/SliderRow.svelte[R33-65]

+  let allOptions = $derived.by(() => {
+    const opts: { label: string; value: string }[] = [];
+    if (rawDefault) opts.push({ label: `${prettyVar(rawDefault)} (default)`, value: rawDefault });
+    for (const o of variableOptions ?? []) {
+      if (o.value !== rawDefault) opts.push(o);
+    }
+    return opts;
+  });
+
+  let matchedOption = $derived(
+    allOptions.find((o) => o.value === (currentRaw ?? rawDefault))
+  );
+
+  let hasVarInfo = $derived(!!rawDefault && !!onRawSet);
+
+  // An override that isn't one of the known options but still looks like a
+  // CSS expression (var()/calc()/clamp()/…) — surface it as editable text
+  // rather than silently falling back to a resolved slider number.
+  let isExprShaped = $derived(
    !!currentRaw && /^(var|calc|clamp|min|max|env)\(/.test(currentRaw.trim())
  );

-  let showRaw = $derived(!!(rawDefault && onRawSet && (userRawMode || isRawOverride || isEditing)));
+  // User-driven view override, layered on top of the value-derived state above.
+  // 'none' = auto-detect from currentRaw; 'slider'/'raw' = user forced a view
+  // while outside the picker (via "Custom value…" or the </> toggle).
+  let manualView = $state<'none' | 'slider' | 'raw'>('none');
+
+  // The dropdown is shown whenever the current state maps to a known option
+  // (the default, or one of the sibling scale steps) and the user hasn't
+  // explicitly asked to go custom.
+  let showPicker = $derived(
+    hasVarInfo && manualView === 'none' && (currentRaw === undefined || !!matchedOption)
+  );
Relevance

⭐⭐⭐ High

Team previously accepted SliderRow UX/correctness fixes; likely will gate picker to avoid
regressions (PR #447).

PR-#447
PR-#457

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
SliderRow always adds rawDefault to allOptions, and showPicker becomes true whenever
hasVarInfo is true and currentRaw is unset. Existing call sites like BordersPanel’s fine-tune
radius rows pass rawDefault + onRawSet but no variableOptions, so they will render a dropdown
(default + “Custom value…”) instead of the intended slider UI.

configurator/src/components/inputs/SliderRow.svelte[32-70]
configurator/src/components/panels/BordersPanel.svelte[334-348]
configurator/src/components/panels/LayoutPanel.svelte[323-344]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`SliderRow` currently renders the picker by default for any row that provides `rawDefault` and `onRawSet` (i.e. `hasVarInfo`), because `showPicker` becomes true whenever `currentRaw === undefined`. Since `allOptions` always includes `rawDefault`, these rows get a dropdown even when `variableOptions` is omitted, producing a near-empty picker (default + “Custom value…”) and hiding the slider until the user makes an extra selection.

This is especially problematic for rows where `rawDefault` is a `calc(...)` expression (e.g. fine-tune radius steps): they are not “token scale pickers” and shouldn’t be rendered as selects.

## Issue Context
The PR’s intent is to show a dropdown for design-token *scales* (space/radius/etc.) when a token’s default is a CSS variable and sibling scale steps are available.

## Fix Focus Areas
- configurator/src/components/inputs/SliderRow.svelte[32-70]
- configurator/src/components/panels/BordersPanel.svelte[334-348]
- configurator/src/components/panels/LayoutPanel.svelte[323-344]

## Proposed fix
1. Add a derived guard for whether a real picker should exist, e.g.:
  - require `variableOptions?.length > 0` (preferred), and optionally
  - require the default (or current value) to look like `var(...)` (to avoid `calc(...)` defaults turning into pickers).
2. Update `showPicker` to include that guard, e.g.:
  - `let canPick = $derived(hasVarInfo && (variableOptions?.length ?? 0) > 0);`
  - `let showPicker = $derived(canPick && manualView === 'none' && (currentRaw === undefined || !!matchedOption));`
  - (optional) also gate with `/^var\(/.test(rawDefault ?? '')` if you want to strictly match the PR’s “default is a CSS variable” requirement.

This keeps the picker for scale-backed sliders while preserving the previous slider-first behavior for rows that don’t provide sibling options (and for `calc(...)` defaults like fine-tune radii).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread configurator/src/components/inputs/SliderRow.svelte

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
configurator/src/components/inputs/SliderRow.svelte (2)

105-115: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: raw-text view has no direct "back to variable" affordance.

Slider view exposes an explicit "back to variable" link (Lines 156-160), but raw-text view only offers the </> toggle (which switches to slider, not directly back to the picker) or clearing the field on blur. Consider adding the same link to the raw-text branch for consistency.

Also applies to: 154-160

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configurator/src/components/inputs/SliderRow.svelte` around lines 105 - 115,
The raw-text branch of SliderRow.svelte lacks the same direct “back to variable”
affordance that the slider branch already provides, so update the conditional UI
around hasVarInfo/showPicker/manualView to surface that link in the raw view as
well. Reuse the existing variable-picker action used in the slider section (the
back-to-variable link logic near the manual/slider toggle) so both views offer
the same path back to the picker, while keeping the current </> toggle for
switching between raw and slider input.

21-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Import VarOption instead of redefining an inline duplicate type.

The variableOptions prop type at Line 22 structurally duplicates the VarOption interface exported from variableScales.ts. Importing the shared type keeps both in sync as the schema evolves.

♻️ Proposed fix
+  import type { VarOption } from '../../lib/variableScales';
+
   let {
     label, help, value, min, max, step, unit, overridden, onChange, onReset,
     rawDefault, currentRaw, onRawSet, variableOptions
   }: {
     ...
     /** Sibling scale steps (e.g. the space or radius scale) offered alongside rawDefault. */
-    variableOptions?: { label: string; value: string }[];
+    variableOptions?: VarOption[];
   } = $props();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configurator/src/components/inputs/SliderRow.svelte` around lines 21 - 23,
The variableOptions prop on SliderRow.svelte is duplicating the shared VarOption
shape instead of using the existing type. Update the component to import
VarOption from variableScales.ts and use it for variableOptions in the $props()
declaration so SliderRow stays aligned with the shared schema as it evolves.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configurator/src/components/inputs/SliderRow.svelte`:
- Around line 138-153: The raw CSS text field in SliderRow.svelte is committing
partial values too early through the oninput handler, which lets invalid drafts
be persisted and applied live. Update the input flow in SliderRow so rawDraft
only updates locally while typing, and call onRawSet from a commit point such as
onblur or Enter after validating the value shape. Keep the existing
backToVariable behavior for empty input, and use the same
rawDraft/rawDefault/onRawSet logic to locate and adjust the current handlers.

---

Nitpick comments:
In `@configurator/src/components/inputs/SliderRow.svelte`:
- Around line 105-115: The raw-text branch of SliderRow.svelte lacks the same
direct “back to variable” affordance that the slider branch already provides, so
update the conditional UI around hasVarInfo/showPicker/manualView to surface
that link in the raw view as well. Reuse the existing variable-picker action
used in the slider section (the back-to-variable link logic near the
manual/slider toggle) so both views offer the same path back to the picker,
while keeping the current </> toggle for switching between raw and slider input.
- Around line 21-23: The variableOptions prop on SliderRow.svelte is duplicating
the shared VarOption shape instead of using the existing type. Update the
component to import VarOption from variableScales.ts and use it for
variableOptions in the $props() declaration so SliderRow stays aligned with the
shared schema as it evolves.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c327b116-4954-4d30-9d8e-9ecfa87e6002

📥 Commits

Reviewing files that changed from the base of the PR and between 5a475e2 and 2676c76.

📒 Files selected for processing (8)
  • configurator/src/components/inputs/SliderRow.svelte
  • configurator/src/components/panels/BordersPanel.svelte
  • configurator/src/components/panels/ComponentsPanel.svelte
  • configurator/src/components/panels/LayoutPanel.svelte
  • configurator/src/components/panels/MacrosPanel.svelte
  • configurator/src/components/panels/MiscPanel.svelte
  • configurator/src/components/panels/SpacingPanel.svelte
  • configurator/src/lib/variableScales.ts

Comment thread configurator/src/components/inputs/SliderRow.svelte
…picker

- Only show the variable dropdown when sibling scale options exist
  (variableOptions.length > 0). Rows that only had a rawDefault (e.g.
  BordersPanel's fine-tune radius steps, LayoutPanel's sticky offsets) were
  regressed into a dropdown with just "default" + "Custom value…" instead of
  a direct slider; they now render the slider with the small "default: ..."
  caption as before.
- Commit the raw-CSS text field on blur/Enter instead of on every keystroke,
  so a partially-typed expression is never persisted as a live override.
- Add a direct "back to variable" link in raw-text mode (only when a real
  picker exists to go back to).
- Import the shared VarOption type instead of duplicating its shape inline.
@jackgranatowski
jackgranatowski merged commit 1ebfd1f into main Jul 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants